#pragma once
#include "link_list.h"
#include "sector_node.h"

enum fs_type_enum {
    FS_TYPE,
    FAT32,
    FS_IMG_TYPE,
    FAT32_IMG,
};

struct fs_ops_struct
{
    int32_t (* fs_sector_init)(struct sector_list* list, uint32_t dsk_size);
    int32_t (* fs_sector_init_img)(struct sector_list* list, uint32_t dsk_size, const char* path);
};

struct fs_obj_struct
{
    const char* image;
    struct fs_ops_struct* ops;
    enum fs_type_enum type;
    struct linked_node node;
};

struct fs_obj_struct* create_fs_obj();
int32_t register_fs_obj(struct fs_obj_struct* fs_obj);
struct fs_obj_struct* find_fs_obj(enum fs_type_enum type);
void free_fs_objs();